define(['oj/file'], function(file) {

    print('pass: print')
    oj.element(document.body, 'div', ['pass: oj.element'])

    var f = file.open('user/uppenwho/test.test')

    f.write('test: file')

    f.close(function(m){
        if (oj.isError(m))
            oj.element(document.body, 'div', ['fail: file write'])
        else {
            oj.element(document.body, 'div', ['pass: file write'])
            f = file.open('user/uppenwho/test.test')
            f.read(function(m){
                if (oj.isError(m))
				    oj.element(document.body, 'div', ['fail: file read'])
                else
                    oj.element(document.body, 'div', ['pass: file read [' + m.file.content + ']'])
            })
        }
    })

})
